package com.zbu.friend.controller.question;

import com.zbu.common.core.comtroller.BaseController;
import com.zbu.common.core.domain.R;
import com.zbu.common.core.domain.TableDataInfo;
import com.zbu.friend.domain.question.dto.QuestionQueryDTO;
import com.zbu.friend.domain.question.vo.QuestionDetailVO;
import com.zbu.friend.service.question.impl.QuestionServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/question")
public class QuestionController extends BaseController {
    @Autowired
    QuestionServiceImpl questionService;
    @GetMapping("/semiLogin/list")
    public TableDataInfo list(QuestionQueryDTO questionQueryDTO){
        questionService.list(questionQueryDTO);
        return null;
    }
    @GetMapping("/detail")
    public R<QuestionDetailVO> detail(Long questionId){
         return R.ok(questionService.detail(questionId));
    }
    //题目的顺序列表
    @GetMapping("/preQuesstion")
    public R<String> preQuesstion(Long quesstionId){
        return R.ok(questionService.preQuesstion(quesstionId));
    }
    @GetMapping("/nextQuesstion")
    public R<String> nextQuesstion(Long quesstionId){
        return R.ok(questionService.nextQuesstion(quesstionId));
    }
}
